class Point:

    def __init__(self, x=0, y=0):
        self.x = x
        self.y = y

    def __add__(self, other):
        return Point(self.x + other.x, self.y + other.y)

    def tranString(self):
        return f"({self.x},{self.y})"

    def __mul__(self, other):
        return Point(self.x * other, self.y * other)

    def __str__(self):
        return f'({self.x}, {self.y})'


# 测试 Point 类
if __name__ == "__main__":
    # 初始化两个点
    point1 = Point(2, 3)
    point2 = Point(4, 5)

    # 测试加法运算符重载
    point3 = point1 + point2
    print(f'point1 + point2 = {point3}')  # 输出 (6, 8)

    # 测试乘法运算符重载
    point4 = point1 * 3
    print(f'point1 * 3 = {point4}')  # 输出 (6, 9)

    # 测试字符串转换
    print(f'str(point1) = {str(point1)}')  # 输出 (2, 3)
    print(f'tranString(point1) = {point1.tranString()}')  # 输出 (2, 3)